package com.tjbank.cssys.mybatis.entity;

import java.io.Serializable;

/**
 * IamRelationship
 * 
 * @author PG(Auto Generator)
 * @version V1.0
 */
public class IamRelationship extends IamRelationshipKey implements Cloneable, Serializable {
    private static final long serialVersionUID = -161123581321345589L;
    /** 实体一类型 [1,0] Not NULL */
    protected String entity1Type;
    /** 实体一代码 [32,0] Not NULL */
    protected String entity1Code;
    /** 关系代码 [50,0] Not NULL */
    protected String relaCode;
    /** 实体二类型 [1,0] Not NULL */
    protected String entity2Type;
    /** 实体二代码 [32,0] Not NULL */
    protected String entity2Code;

    public IamRelationship() {
        super();
    }

    public IamRelationshipKey primaryKey() {
        return new IamRelationshipKey(id);
    }

    /** 取值 <== 实体一类型 [1,0], Not NULL */
    public String getEntity1Type() {
        return entity1Type;
    }

    /** 赋值 ==> 实体一类型 [1,0], Not NULL */
    public void setEntity1Type(String entity1Type) {
        this.entity1Type = entity1Type == null ? null : entity1Type.trim();
    }

    /** 取值 <== 实体一代码 [32,0], Not NULL */
    public String getEntity1Code() {
        return entity1Code;
    }

    /** 赋值 ==> 实体一代码 [32,0], Not NULL */
    public void setEntity1Code(String entity1Code) {
        this.entity1Code = entity1Code == null ? null : entity1Code.trim();
    }

    /** 取值 <== 关系代码 [50,0], Not NULL */
    public String getRelaCode() {
        return relaCode;
    }

    /** 赋值 ==> 关系代码 [50,0], Not NULL */
    public void setRelaCode(String relaCode) {
        this.relaCode = relaCode == null ? null : relaCode.trim();
    }

    /** 取值 <== 实体二类型 [1,0], Not NULL */
    public String getEntity2Type() {
        return entity2Type;
    }

    /** 赋值 ==> 实体二类型 [1,0], Not NULL */
    public void setEntity2Type(String entity2Type) {
        this.entity2Type = entity2Type == null ? null : entity2Type.trim();
    }

    /** 取值 <== 实体二代码 [32,0], Not NULL */
    public String getEntity2Code() {
        return entity2Code;
    }

    /** 赋值 ==> 实体二代码 [32,0], Not NULL */
    public void setEntity2Code(String entity2Code) {
        this.entity2Code = entity2Code == null ? null : entity2Code.trim();
    }

    /** 浅克隆 */
    @Override
    public IamRelationship clone() {
        IamRelationship cloneIamRelationship = null;
        try {
            cloneIamRelationship = (IamRelationship) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new RuntimeException(e);
        }
        return cloneIamRelationship;
    }

    @Override
    public String toString() {
        return "IamRelationship [id = " + id + ", entity1Type = " + entity1Type + ", entity1Code = " + entity1Code
                + ", relaCode = " + relaCode + ", entity2Type = " + entity2Type + ", entity2Code = " + entity2Code + "]";
    }
}